<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <title>医师认证</title>
    <script src="../resource/js/jquery-1.11.1.min.js"></script>
    <?php PrintPageHead(); ?>
</head>
<body>
<script src="../resource/js/jquery-1.11.1.min.js"></script>
<link href="../resource/css/hermes.css" rel="stylesheet">
<link href="../resource/js/calendar/calendar-blue.css" type="text/css" rel="stylesheet">
<script src="../resource/js/calendar/calendar.js" type="text/javascript"></script>
<script src="../resource/js/hermes.js"></script>

<style type="text/css">
    .form_d{
        margin: 20px ;
    }
</style>
<!-- 配置文件 -->
<script type="text/javascript" src="../ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="../ueditor/ueditor.all.min.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    var ue = UE.getEditor('container', {
        toolbars: [
            [  'source', '|', 'undo', 'redo', '|',
                'bold', 'italic', 'underline', 'insertorderedlist',
                '|',
                'simpleupload', 'emotion']
        ],
        autoHeightEnabled: true,
        autoFloatEnabled: true
    });
//关闭窗口
    function closeWind(){
        if(typeof(WeixinJSBridge)=='undefined')
            window.close();
        else
            WeixinJSBridge.invoke('closeWindow',{},function(res){
                return true;
            });
    }
</script>
<style>
    .banes {
        width: 90%;
        margin: 10px auto;
    }
    #banas{
        width:33%; float: left;
    }
    #bana{
        width:33%; float: left;
        background-color:#00a2d4;
        color: #ffffff;
    }
    .calendar{
        z-index:999999;
    }
</style>
<?php
global $openId;
$openId=getCurrentUserOID();//id
$bm=new CUI数据中心(Page::m卖家中心_账目,$openId);
$注册 = $bm->生成有效链接('register',$_GET['state']);
$店铺id = $_SESSION['vo用户数据']['所属店铺id'];
$用户id = $_SESSION['vo用户数据']['id'];
//$用户id = 96;
$sql = "SELECT a.头像 as 头像,a.密码 as 密码 ,b.* from 用户 as a left join 医师详情 as b  on a.id = b.用户id where a.id = $用户id";
$arr1 = pdo()->selectOne($sql);
if(!$arr1['密码']){
    header("Location:".$注册);
}
?>
<div class="container-fluid">
    <!--    <h2 class="text-center bg-primary">--><?//=$pageTitle?><!--</h2>-->
    <div class="panel panel-primary">
        <div class="panel-heading text-center"><h3 class="panel-title">医师认证</h3></div>
        <div class="panel-body">

        </div>
        <div class="panel-body">
            <form class="form-horizontal"   action="../commit.php" method="post" enctype="multipart/form-data" onsubmit="return checkdata()">
                <div class="form-group has-feedback has-success">
                    <label for="nickName" class="col-md-3 control-label text-right ">头像</label>
                <div class="col-md-9">
                     <img src="<?=$arr1['头像']?>" title="头像" alt="头像" style="width:30%"/><br/>
                    <?php if($arr1['学历号']){?>
                    <input name='pic' id="pic" type='file' style="width:200px;height:40px; margin: 5px"/>
                    <?php }?>
                </div>
                </div>
                <div class="form-group has-feedback has-success">
                    <label for="nickName" class="col-md-3 control-label text-right ">姓名</label>
                    <div class="col-md-9">
                        <input type='text' class="form-control" name="name" id="title" value="<?=$arr1['name']?>" >
                        <span class="glyphicon glyphicon-star form-control-feedback"></span>
                    </div>
                </div>
                <div class="form-group has-feedback has-success">
                    <label for="nickName" class="col-md-3 control-label text-right ">医院</label>
                    <div class="col-md-9">
                        <input type='text' class="form-control" name="医院" id="title"  value="<?=$arr1['医院']?>" >
                        <span class="glyphicon glyphicon-star form-control-feedback"></span>
                    </div>
                </div>
                <div class="form-group has-feedback has-success">
                    <label for="nickName" class="col-md-3 control-label text-right ">职称</label>
                    <div class="col-md-9">
                        <input type='text' class="form-control" name="职称" id="title"  value="<?=$arr1['职称']?>">
                        <span class="glyphicon glyphicon-star form-control-feedback"></span>
                    </div>
                </div>
                <div class="form-group has-feedback has-success">
                    <label for="nickName" class="col-md-3 control-label text-right ">专业</label>
                    <div class="col-md-9">
                        <input type='text' class="form-control" name="专业" id="title"  value="<?=$arr1['专业']?>">
                        <span class="glyphicon glyphicon-star form-control-feedback"></span>
                    </div>
                </div>

                <div class="form-group has-feedback has-success">
                    <label for="nickName" class="col-md-3 control-label text-right ">医师学历证号</label>
                    <div class="col-md-9">
                        <input type='text' class="form-control" name="学历号" id="title"  value="<?=$arr1['学历号']?>">
                        <span class="glyphicon glyphicon-star form-control-feedback"></span>
                    </div>
                </div>

                <div class="form-group has-feedback has-success">
                    <label for="sellerName" class="col-md-3 control-label text-right ">医师资格证照</label>
                    <div class="col-md-9">
                        <?php if($arr1['照片']){?>
                        <img src="<?=$arr1['照片']?>" title="照片" alt="照片" style="width:30%"/><?php }else{?>
                        <input name='pic' id="pic" type='file' style="width:200px;height:40px; margin: 5px"/>
                        <?php }?>
                    </div>
                </div>

                <div class="form-group has-feedback has-success">
                    <label for="description" class="col-md-3 control-label text-right ">个人简介</label>
                    <div class="form_d" style="width:90%;float: right">
                        <textarea id="container" name="简介"><?=$arr1['简介']?></textarea>
                    </div>
                </div>


                <input type="hidden" name="businessFlag" value="医师认证<?php if($arr1['学历号']){echo '修改';}?>">
                <input type="hidden" name="店铺id" value="<?=$店铺id?>">
                <input type="hidden" name="用户id" value="<?=$用户id?>">
                <?php if($arr1['id']){?>
                <input type="hidden" name="医师详情id" value="<?=$arr1['id']?>">
                <?php }?>
                <div class="form-group text-center" style=" width: 100%; float: left">
                    <button type="submit" id="tijiao" class="btn btn-lg btn-success ">&nbsp;&nbsp;保  存&nbsp;&nbsp;</button>
                    <button type="button" id="guanbi" class="btn btn-lg btn-success" onclick="closeWind();">&nbsp;&nbsp;关  闭&nbsp;&nbsp;</button>
                </div>
        </div>

    </div>

</div>


<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->


<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="../resource/js/bootstrap.min.js"></script>
<script>
    function checkdata() {
        var title = $('input[name="title"]').val();
        var stime = $('input[name="stime"]').val();
        var etime = $('input[name="etime"]').val();

//        if($.trim(title)=='') {
//            alert('住院号不能为空!');
//            $('input[name="title"]').focus();
//            return false;
//        }
        $('#tijiao').attr('disabled','disabled');
        $('#guanbi').attr('disabled','disabled');
    }
</script>
</body>
</html>